<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    
    <script>
        // 递归 ： 函数中调用函数自己，此时就是递归，递归一定要有结束的条件

        var i = 0;
        function  f1(){
            i++;
            
            console.log('从前有座山，山里有个小和尚')
            
            if(i<5)
                f1()
        }

        f1();

    </script>
</body>
</html>